package com.xiao.springmvc.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import com.xiao.springmvc.entity.ProductInfo;
import com.xiao.springmvc.jpa.ProductDao;

@Service
public class ProductService {

	@Autowired
	private ProductDao productDao;
	
	public Page<ProductInfo> findByCompanyId(long companyId,Pageable pageable){
		return productDao.findByCompanyId(companyId,pageable);
	}
	
	public ProductInfo findById(long id){
		return productDao.findById(id);
	}
}
